package com.edison.demo.until;

import java.util.Random;

/**
 * @author edison
 */
public class OpenAcctOrgNoGenerator {

    private OpenAcctOrgNoGenerator(){
        throw new IllegalStateException("Utility class");
    }


        private static final Random RANDOM = new Random();

        public static String generateOpenAcctOrgNo() {
            // Choose a random prefix from the sample data ranges (e.g., 100, 130, 250, etc.)
            int[] prefixes = {130, 260, 180, 250, 50, 70, 30, 170, 110, 350, 100, 120, 20, 40};
            int prefix = prefixes[RANDOM.nextInt(prefixes.length)];

            // Generate a random suffix from 1 to 6 digits, as seen in the sample data
            int suffix = RANDOM.nextInt(1000) + 100;

            // Return formatted open_acct_org_no
            return String.format("%d%03d", prefix, suffix);
        }


}
